package com.hzt.agprosaleplatform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzt.agprosaleplatform.entity.Good;
import com.hzt.agprosaleplatform.entity.Shop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ShopMapper extends BaseMapper<Shop> {
    @Select("SELECT * FROM t_goods WHERE shop_id = #{shop_id} AND (isDeleted = 0 OR isDeleted IS NULL)")
    List<Good> selectGoodsByShopId(@Param("shop_id") Integer shop_id);
}
